@buffer was pointing to nowhere