fixed bugs from shannas machine