Bug fixes

works kinda