Fixed missing bower and added sanitisation in upgrade