fixed a bug in publishing to rpubs (thanks @kohske)