fix #2 - invalid pointer