Fix issues from last commits, found via tests
* Sign problem caused small images to fail
* Need stddef.h everywhere
* Note to self: remember to test before pushing
Fixed issues found with Xcode Analyzer