I decided to do away with the z-index ordering and programatically work out what sprite is at the top of the screen and draw them first, then come down the screen and then draw them secondly.
This works well and my character will now get draw correctly behind and in front of other sprites. However, this only works if my sprites are the same size as me character (32x32) if I use double height sprites (32x64) the object gets drawn top of my character if Im standing above the top half of the sprite.