fixed some compilation related errors