Fixed some bugs & Added LockDown for SQL errors