Fix object editing bugs