fixed a really buggy bug