Test

Fixed couple of simple bugs.