Fixed a case where the same variable ($success) var used as both string and int