Fixed the errors in edit attendance