fix for issue #1144

Same as above. Make the code a bit more descriptive. Use additional method or just comments