fixed those 2 bugs