Fixed bad bugs