fixed pointer error