Quick fix, added pointer initialization and test