Fixed potential buffer pointer breakage

Closes #67