Fix a bug in gui sliding panels