fixed #11
added missing type conversion