cleanup error msgs/bug fix