Resolution for issue  #757

Not the prettiest implementation, however it does work. Any refactoring ideas welcomed.

fixes #757 
ah. I see what you did there ;)