alternative fix for #294 @Gasol