Some structural bugs solved