Simplified solution to #135