This was caused by a missing state reset. Also adding safety state reset before and after drawing (might not be necessary).