few bug fixes
Merge remote-tracking branch 'upstream/master'

Conflicts:
	executemain.php
	scripts/main.py