Use 0 instead of empty string to empty the buffer

Not sure if it's an elegant solution, but this fixes #8.