compilation bug fixes