Fix build errors. Fixes #293