fixed ios bug (finally!)