Fixed error casting json data