fixed little bug with pointer