BUG FIXED
add exception handler