Fix for mahdi