Fixed a bug
Added a error message