fixes for cmake, error messages and python