First attemp of fix for #115 #134