Pir bugg fix