fix errors in apply