fixed the bug not rendering properly