Fixed compilation error, fixed posting error

- Text posts are working fine, images not
- Fixed a compilation error