Fixed crash when drawing points