Possible bugfix and improved readability