Fix the libdisplaystack animation bug on 5.x and fix for 6.x