Minor updates to improve warnings and error messages.