Fix cubic length bug