Fixing error with rendering