Fixes for my issues

Fixes for both:

Issue https://github.com/yawd/yawd-admin/issues/14 and issue https://github.com/yawd/yawd-admin/issues/12

Hope that helps!