importing changes from pornel:master