FIX issue #5: fix errors