Fixed error occuring and code

Added error occuring and their right comprehensing