Small bux fix with code, array_merge does not work as expected in this case