added warning, fixed error