Fix for #254

This is my fix for #254.