bufixes to main script