changing the conditions for proper rendering