Merging Canvox's patch 

Thanks!