Fixed bugs with online