fixing linking bugs