Fixed buffer and added tests