Fixed some erroeneous defines and added a little test