fixed a bunch of compile issues, stupid compiler...