smav: bugs fixed, seems to be working OK
smav: bugs fixed, seems to be working OK

lgbouma/astrobase,waqasbhatti/astrobase,waqasbhatti/astrobase,lgbouma/astrobase,waqasbhatti/astrobase,lgbouma/astrobase