small issue fix in controllers save function to get id