Fixed renderer bug. Small compiler optimizing.

Signed-off-by: SeynovAM <sejnovalexey@gmail.com>