edited task form
fixed two bugs with resource
fix to avoid nil on admin page