Enable compiler warnings

looks like this fixes some bugs, too!