manually adding changes from pokxe-master #1