fixed bug where any attribute 'selected' meant selected. Now, selected only when selected's value is 1. Alternately, can use 'checked' to mean selected.