Fixed array_merge ordering. Added (array) cast