fixed possible errors