Fixed more bugs, specifically to make it work with C90