Bug fixes - Error message now print properly