Fixing a bug in the dispose method of the as side