small fixes and scripts