Factorials problem resolved