fixed errors after compile