Attempt to fix rendering bugs