Fixed some compilation issues