fixed sequencing issues