[5-to-6] fixed based on feedback by hexcoder++