misc fixes. Added renderstates for drawing