Fixed a few rendering bugs