Fix render bug