Fixed syntax error
Added purging of old modules during update