collapse animation bugfix in custom build