Handled some exceptions