Fix compile errors

Fix #1