fixing lines and bugs