Fixed compile errors, closed issue #19