Fixed bug causing app to insert multiple db entries.