Fixing some small bug in automation code