Possibly fix #139 (but still not quite there...)

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>