fix potential crash with RB2.99 and ubuntu 13.10