Improved custom item positioning