fixed catch exception problem