Fixed some issues the mono compiler was complaining about.