ENH: fix error messages + casting issues
FIX warning import