Added a fix for the php error on the preg-replace function.