fixed minor errors when changing scene