fixed some scripty bugs