fixed problem with stages