merge from kodered

Taking changes from kodered