fix bugs stemming from real deployment