fixing #3 as sugested by @bdpsoft