fix errors in attendance controller