Fixed the bug.. cleanup needed