fixed compliation errors in while and sequence