fixing exception error