Fixed a few bugs related to the new mesh renderer