Fixing null pointed