fix linking on ubuntu 13.10
fix inend