Small pack of fixes: buffer protocol and compiling