fixed bug in middle rates