added bug snag plus basic errors.