fixing factor bug