JPMorgan profits beat expectations but bank warns on margins