Fixed compilation & link errors