Fix bugs completed